﻿@namespace AntDesign
@inherits AntDomComponentBase
@typeparam TItem

<div class="@ClassMapper.Class" style="@Style" @ref="Ref">
    <div class="ant-tree-list">
        <div class="ant-tree-list-holder-inner">
            <CascadingValue Value="this" Name="Tree" IsFixed="@true">
                @if (DataSource != null)
                {
                    foreach (var item in DataSource)
                    {
                        <TreeNode DataItem="@item" @key="item.GetHashCode()"></TreeNode>
				    }
                }
                else if (ChildContent!=null)
				{
					@ChildContent
				}
				else
				{
                    @Nodes
                }
            </CascadingValue>
        </div>
    </div>
</div>